import request from '@/utils/request'  

const api_name = '/eduservice/eduteacher' //常量api 相当于idea类头 ：@RequestMapping("/eduservice/eduteacher")
export default  {//模块化es6第二种方式
    
 // 分页讲师列表带条件  idea--order = 4
 getTeacherPageVo(current,limit,teacherQuery){
     return request({   //return  request url
        url: `${api_name}/getTeacherPageVo/${current}/${limit}`, //拼接后端地址 票号+差值表达式
        method: 'post',
        data: teacherQuery //转化json串
     });       
 },
 //根据id删除讲师  idea--order = 2
 removeById(id){
     return request({
        //  url: `${api_name}/${teacherId}`,
         url: `/eduservice/eduteacher/${id}` , // @DeleteMapping("{id}")
         method: 'delete'
     });
 },
 //新增讲师  idea--order = 5
 addTeacher(eduTeacher){
     return request({
        url :`/eduservice/eduteacher/addTeacher`,
        method: 'post',
        data: eduTeacher//传的json串
     });
 }
}